#pragma once
#include <iostream>

//#include "hashbucket.h";
#include "unorderedset.h"
#include "unorderedmap.h"

using namespace std;

void test1()
{
	MyHashBucket::Unordered_Set<int> unset1;
	for (int i = 0;i < 20;i++)
	{
		unset1.insert(i);
	}
	for (int i = 53;i < 73;i++)
	{
		unset1.insert(i);
	}
	for (auto it : unset1)
	{
		cout << it<<' ';
	}
	cout << endl;
	cout << unset1.find(53).second << endl;
	unset1.erase(53);
	cout << unset1.find(53).second << endl;
	unset1.clear();
	for (auto it : unset1)
	{
		cout << it << ' ';
	}
}

void test2()
{
	MyHashBucket::Unordered_Map<int,int> unmap1;
	for (int i = 0;i < 20;i++)
	{
		unmap1.insert({ i,i });
	}
	for (int i = 53;i < 73;i++)
	{
		unmap1.insert({ i,i });
	}
	for (auto it : unmap1)
	{
		cout << it.first << ' ';
	}
	cout << endl;
	cout << unmap1.find(53).second << endl;
	unmap1.erase(53);
	cout << unmap1.find(53).second << endl;
	unmap1.clear();
	for (auto it : unmap1)
	{
		cout << it.first << ' ';
	}
}


int main()
{
	test1();
	test2();
	return 0;
}